package com.scuec.trainingmanagementsys.service.impl;

import com.scuec.trainingmanagementsys.entity.Announcement;
import com.scuec.trainingmanagementsys.mapper.AnnouncementMapper;
import com.scuec.trainingmanagementsys.service.AnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class AnnouncementServiceImpl implements AnnouncementService {

    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public List<Announcement> findAll() {
        return announcementMapper.findAll();
    }

    @Override
    public List<Announcement> findByTitle(String title) {
        return announcementMapper.findByTitle(title);
    }

    @Override
    public int deleteByTitle(String title) {
        return announcementMapper.deleteByTitle(title);
    }

    @Override
    public int deleteByTitles(List<String> titles) {
        return announcementMapper.deleteByTitles(titles);
    }

    @Override
    public List<Announcement> findByTeacherNumber(String teacherNumber) {
        return announcementMapper.findByTeacherNumber(teacherNumber);
    }

    @Override
    public int addAnnouncement(Announcement announcement) {
        return announcementMapper.addAnnouncement(announcement);
    }
}